// custom-tab-bar/index.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    
  },

  /**
   * 组件的初始数据
   */
  data: {
    selected:0,
    color:'#7a7e83',
    selectedColor:'#3cc51f',
    list:[
      {
        "pagePath":"../pages/tabbar/index",
        "iconPath":"../images/component.png",
        "selectedIconPath":"../images/component-on.png",
        "text":"主页",
        iconClass:'icon-homefill'
      },
      {
        "pagePath":"../pages/tabbar1/index",
        "iconPath":"../images/component.png",
        "selectedIconPath":"../images/component-on.png",
        "text":"index",
        iconClass:'cu-btn icon-add bg-green shadow'
      },{
        pagePath:'/pages/tabbar3/index',
        iconPath:'/images/component.png',
        selectedIconPath:'/images/component.png',
        text:'我的',
        iconClass: "icon-my",
        iconTopClass: "" 
      }
    ]
  },

  /**
   * 组件的方法列表
   */
  methods: {
    switchTab(e){
      const data = e.currentTarget.dataset;
      const url = data.path;
      wx.switchTab({
        url: 'url',
      })
    }
  }
})
